/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package raccoon.logica.servicios.localizadorserviciosdatos;

import java.util.Properties;
import javax.naming.InitialContext;
import raccoon.datos.fachadas.FachadaEntidadesRemote;

/**
 *
 * @author Administrator
 */
public class Buscador {

    public static FachadaEntidadesRemote getFachadaEntidades() {
        FachadaEntidadesRemote facEnti = null;
        try {
            Properties props = new Properties();
            props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
            props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
            props.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
            props.setProperty("org.omg.CORBA.ORBInitialHost", "??.??.??.??");
            props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
            InitialContext ic = new InitialContext(props);
            facEnti = (FachadaEntidadesRemote) ic.lookup(FachadaEntidadesRemote.class.getName());

        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return facEnti;
    }
}
